﻿@namespace MduiBlazor
@inherits MduiComponentBase
@implements IDisposable

<MduiCollapse Open="@Open" Class="@Class" Style="@Style" UseMduiTypo="@UseMduiTypo" @attributes="@AdditionalAttributes">
    <HeaderContent>
        <div class="@HeaderClassname" style="@HeaderStylelist" @onclick="@OnTitleClicked" @onclick:stopPropagation="@true">
            @if (IconContent is not null)
            {
                @IconContent
            }
            @if (Icon is not null)
            {
                <MduiIcon Icon="@Icon" />
            }
            <div class="mdui-list-item-content">@Title</div>
            <i class="mdui-collapse-arrow mdui-icon material-icons">keyboard_arrow_down</i>
        </div>
    </HeaderContent>
    <ChildContent>
        <div class="@BodyClassname">
            <CascadingValue Value="@this" IsFixed>
                @ChildContent
            </CascadingValue>
        </div>
    </ChildContent>
</MduiCollapse>